#define BOOST_SPIRIT_THREADSAFE
#define _CRT_SECURE_NO_WARNINGS true

#include <windows.h>
#include <string>
#include <iostream>
#include <utility>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <log4cplus/logger.h>
#include <log4cplus/configurator.h>
#include <log4cplus/loggingmacros.h>
#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc++/security/auth_context.h>
#include <grpc++/support/config.h>
#include <grpc++/support/status.h>
#include <grpc++/support/string_ref.h>
#include <grpc++/support/time.h>
#include <grpc++/security/auth_context.h>
#include <grpc++/security/credentials.h>
#include <grpc++/grpc++.h>

#include "qqmessage.grpc.pb.h"
#include "log.h"

int main(){
	LOG_INIT("conf/log4cplus.properties");
	LOGD( "ceshi info");
	std::shared_ptr<grpc::Channel> channel = grpc::CreateChannel("127.0.0.1:55551", grpc::InsecureCredentials());
	auto controllerClient_ = qq::message::Controller::NewStub(channel);
	grpc::ClientContext context;
	qq::message::ControllerPrivateMsg msg;
	msg.set_fromqq(123456);
	msg.set_msg("helloworld");
	qq::message::Gvoid gvoid;
	grpc::Status st = controllerClient_->privateMsg(&context, msg, &gvoid);
	LOGD("status " << st.ok());
	return 0;

}